package com.starnet.studentmanagement.vo;

public enum ResultCode {
    SUCCESS(200,"请求成功"),
    NOT_FOUND(404,"资源不存在"),
    BAD_PARAM(400,"请求参数错误"),
    UNKNOWN_ERROR(403,"服务端未知错误发生"),
    UNAUTHORIZED(401, "用户需要验证"),
    EXISTED(405,"数据已存在"),
    ILLEGAL_PARAM(406,"参数不合法"),
    EMPTY_RESULT(204,"请求成功但无匹配数据");
    private int code;
    private String msg;

    ResultCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
